<!DOCTYPE html>
<html ng-app="addpicremark.app">

<head>
    <meta charset=utf-8>
    <meta name=description content="">
    <meta name=viewport content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>添加相片评语</title>
    <link rel="stylesheet" type="text/css" href="/lib/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/common.css">
    <link rel="stylesheet" type="text/css" href="/css/addpictureremark.css">
    <!--[if lte IE 8]>
    <script src="/js/ie8.js"></script>
    <![endif]-->
    <script src='/lib/jquery/dist/jquery.min.js'></script>
    <script src="/lib/ng-file-upload/ng-file-upload-shim.min.js"></script>
    <script src='/lib/angular/angular.min.js'></script>
    <script src="/lib/ng-file-upload/ng-file-upload.min.js"></script>
    <script src="/lib/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
    <script src="/js/addpictureremark.js"></script>
</head>

<body>
    <div class="header">
    </div>
    <div class="con" ng-controller="pagectrl as vm">
        <div class="title">
            添加
            <a href="/" target="_self" class='right'>返回>></a>
        </div>
        <form name="form" class="pic-group" ng-submit="vm.submit()">
            <div class="type-remark">
                <label for="type">证件类型：</label>
                <input type="text" name="type" autocomplete="off" placeholder="输入证件类型" required="required" ng-model="vm.input.typeName" typeahead="type.TYPENAME for type in vm.types | filter:$viewValue | limitTo:10">
                <label for="remark">评语：</label>
                <input type="text" name="remark" autocomplete="off" placeholder="输入评语" required="required" ng-model="vm.input.remark" typeahead="remark.REMARK for remark in vm.remarks | filter:$viewValue | limitTo:10">
            </div>
            <div class="group" ng-repeat="picGroup in vm.input.picGroup">
                <div class="group-name">
                    <input type="text" name="group" ng-model="picGroup.groupName" placeholder="分组名称" ng-required="picGroup.pic.length>1">
                </div>
                <ul>
                    <li ng-repeat="pic in picGroup.pic">
                        <div class='pic-box'>
                            <input class="upload" type="file" ngf-select="uploadFiles($files,picGroup)" ngf-pattern="'image/*'" ngf-accept="'image/*'" multiple="multiple" ng-if="!pic.id">
                            <img ng-src="/resource/{{pic.id}}" ng-if="pic.id" />
                            <a href="javascript:;" class="pic-del" title="删除相片" ng-if="pic.id" ng-click="deleteFile(picGroup,$index)"></a>
                        </div>
                        <div class="pic-name">
                            <input type="text" name="filename" autocomplete="off" placeholder="请输入相片名称" ng-model="pic.fileName" ng-if="pic.id" required="required"> {{pic.id?'':'相片名称'}}
                        </div>
                    </li>
                </ul>
            </div>
            <div class="butngroup">
                <a href="javascript:;" ng-click="vm.addGroup()" class="butn butn-b">添加分组</a>
                <input class="butn butn-b" type="submit" name="" value="确定">
            </div>
        </form>
    </div>
</body>

</html>
